﻿namespace Sai.Console
{
	using Sai.Cecil;
	using Sai.Core.Introspection;

	/// <summary>
	/// Used to create an IAssemblyIntrospector object required to build
	/// the reflected assembly info.
	/// </summary>
	public static class AssemblyIntrospectorFactory
	{
		/// <summary>
		/// Singleton for this inspector - not sure if it needs to be.
		/// </summary>
		private static IAssemblyIntrospector introspector;

		/// <summary>
		/// Singleton method.
		/// </summary>
		public static IAssemblyIntrospector Introspector
		{
			get
			{
				return introspector ?? new MonoCecilAssemblyIntrospector();
			}

			set
			{
				introspector = value;
			}
		}
	}
}
